<template>
  <custom-container>
    <custom-container-header no-spacing>
      <el-form :model="filters" ref="form" :disabled="loading"
               inline size="medium"
               @submit.native.prevent="gridSearch"
      >
        <el-form-item label="账户名">
          <el-input v-model="filters.username" auto-complete="off" />
        </el-form-item>
        <el-form-item>
          <el-button type="primary" native-type="submit">查询</el-button>
        </el-form-item>
      </el-form>
    </custom-container-header>
    <custom-container-body>
      <el-table :data="tableData" :loading="loading" element-loading-text="加载中..." border border-radius
      >
        <el-table-column
          align="center"
          prop="userName"
          label="会员名">
        </el-table-column>
        <el-table-column
          align="center"
          label="投注金额">
          <template slot-scope="{row}">
            {{row.betAmount | currency}}
          </template>
        </el-table-column>

        <el-table-column
          align="center"
          prop="betCount"
          label="投注单数">
        </el-table-column>

        <template slot="empty">
          <div class="el-table__empty">
            <svg-icon class="el-table__empty-icon" icon-class="grid-empty-2"></svg-icon>
            <div class="el-table-text">暂无数据</div>
          </div>
        </template>
      </el-table>
    </custom-container-body>
  </custom-container>
</template>

<script>
  import {memberCommissionDetailApi as getApi} from '@/services/api/report';

  import {grid} from '@/build';

  export default {
    name: "effect-member-detail",
    mixins: [grid],

    props: ['info'],

    data() {
      return {
        filters: {
          settleDate: this.info.settleDate,
          username: undefined
        },
        tableData: []
      };
    },

    mounted() {
      this.bindGet(getApi, 'tableData', {
        action: 'getGrid',
        sendingData: 'filters',
      });

      this.getAll();
    }
  };
</script>

<style scoped>

</style>